#include <iostream>
#include <math.h>

const int hour2minute = 60;
const int minute2second = 60;
const int day2hour = 24;

int main() {
	using std::cout;
	using std::cin;
	using std::endl;

	long long seconds = 0;
	int days = 0, hours = 0, minutes = 0;
	cout << "Enter the numbere of seconds: ";
	cin >> seconds;

	long long seconds_temp = seconds;
	minutes = seconds / minute2second;
	hours = minutes / hour2minute;
	days = hours / day2hour;
	seconds %= minute2second;
	minutes %= hour2minute;
	hours %= day2hour;

	cout << seconds_temp << " seconds = "
		<< days << " days, "
		<< hours << " hours, "
		<< minutes << " minutes, "
		<< seconds << " seconds"
		<< endl;
	return 0;
}